import request from '@/utils/request'

// 查询应付账款列表
export function listPayable(query) {
  return request({
    url: '/finance/payable/list',
    method: 'get',
    params: query
  })
}

// 查询应付账款详细
export function getPayable(id) {
  return request({
    url: '/finance/payable/' + id,
    method: 'get'
  })
}

// 新增应付账款
export function addPayable(data) {
  return request({
    url: '/finance/payable',
    method: 'post',
    data: data
  })
}

// 修改应付账款
export function updatePayable(data) {
  return request({
    url: '/finance/payable',
    method: 'put',
    data: data
  })
}

// 根据id查询一条计费记录
export function getPaymentById(id) {
  return request({
    url: '/finance/payable/byId?id=' + id,
    method: 'get'
  })
}